<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      let stature = prompt('请输入您的身高m')
      let weight = prompt('请输入您的体重kg')
      let bgi = Number(weight) / (Number(stature) * Number(stature))
      if (bgi < 18) {
        alert('多吃点吧')
      } else if (bgi >= 18 && bgi < 25) {
        alert('刚刚好')
      } else if (bgi >= 25 && bgi < 28) {
        alert('稍微超标')
      } else if (bgi >= 28 && bgi < 32) {
        alert('规划减肥')
      } else if (bgi >= 32) {
        alert('不减不行')
      }
    </script>
  </body>
</html>
